package com.skycan.plc.adapter.protocol.s7;

/**
 * S7协议常量
 */
public class S7Constants {

    // S7区域标识符
    public static final String DATA_BLOCK_PREFIX = "DB"; // 数据块
    public static final String INPUT_PREFIX = "I"; // 输入区
    public static final String OUTPUT_PREFIX = "Q"; // 输出区
    public static final String MARKER_PREFIX = "M"; // 标记区
    public static final String COUNTER_PREFIX = "C"; // 计数器
    public static final String TIMER_PREFIX = "T"; // 定时器

    // S7数据类型
    public static final String BOOL = "BOOL"; // 布尔型
    public static final String BYTE = "BYTE"; // 字节
    public static final String WORD = "WORD"; // 字
    public static final String DWORD = "DWORD"; // 双字
    public static final String INT = "INT"; // 整型
    public static final String DINT = "DINT"; // 双整型
    public static final String REAL = "REAL"; // 实数

    // S7连接参数
    public static final String S7_200_TRANSPORT_TYPE = "s7"; // S7-200 SMART传输类型
    public static final String S7_1200_TRANSPORT_TYPE = "s7"; // S7-1200传输类型

    // S7默认连接超时(毫秒)
    public static final int CONNECTION_TIMEOUT = 5000;

    // 私有构造函数，防止实例化
    private S7Constants() {
    }
}